fix(rust-ci): make the newly-wired GitLab cargo jobs actually pass - #74
Merged
Conversation
selur has never compiled: sign_image had a function-local `use tokio::io::AsyncReadExt;` but generate_keypair (a second call site added later) also calls `.take(..).read_to_string(..)` without the trait in scope, so `file.take(1024*1024)` resolved to Iterator::take on tokio::fs::File and failed with E0599/E0282. The GitLab cargo-* jobs never caught it because they were dormant until they were wired to run (#71); the NIF/service build in nif-build.yml doesn't cover services/. Hoist the import to module scope (covering both call sites, dropping the now-redundant local one) and drop the unnecessary `mut` on the two read-only File bindings. Verified: `cargo build --release` and `cargo test` both pass. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Kq24sZCEohSrNFXSuEuz6C
The GitLab `rustfmt` job (not allow_failure) loops over every first-party crate running `cargo fmt -- --check`; all eight failed because the code had never been fmt-checked while the job was dormant. Pure `cargo fmt` output across the eight buildable crates (opsm-ui/tui, opsm_pq_nif, and the six services/*), no logic changes. quic_transport is left untouched (quarantined; does not build). Verified: every crate is now fmt-clean and still builds. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Kq24sZCEohSrNFXSuEuz6C
…argo jobs Wiring the cargo-* jobs to actually run (#71) exposed that opsm_ex/native/quic_transport does not compile: its pinned h3 0.0.6 / h3-quinn 0.0.7 predate quinn 0.11's private StreamId field, and with no committed Cargo.lock the fresh dependency resolve breaks. It is an OPTIONAL QUIC/HTTP3 NIF — Opsm.Transport.QuicNif swallows a failed :erlang.load_nif and falls back to HTTP/2 (nif_loaded? is hard-coded false), so the Elixir side runs without it and no CI builds it today. Remove it from $RUST_CRATE_DIRS (the build loop) and from every `rules: exists:` / artifacts list, with a QUARANTINED header note giving the un-quarantine condition: migrate the h3/h3-quinn/quinn triple to a mutually-compatible set and commit a lockfile. Tracked as a follow-up. The remaining eight crates all build, test, and fmt-clean locally. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Kq24sZCEohSrNFXSuEuz6C
hyperpolymath
marked this pull request as ready for review
July 21, 2026 21:26
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Follow-up to #71, closing the gap I flagged there: the GitLab
cargo-*jobs were "reviewed by inspection, not runnable in the sandbox." I have a working Rust toolchain here, so I actually ran all nine first-party crates throughcargo build/test/fmt. Result: 8 of 9 build clean once fixed, 1 is a known-optional non-builder. Three commits:1.
fix(selur): add missing tokio AsyncReadExt import(02ff456)services/selurhas never compiled.sign_imagehad a function-localuse tokio::io::AsyncReadExt;, butgenerate_keypair(a second call site) also doesfile.take(..).read_to_string(..)without the trait in scope — so.take()resolved toIterator::takeontokio::fs::Fileand failed (E0599/E0282). The dormant GitLab jobs never caught it, andnif-build.ymldoesn't coverservices/. Hoisted the import to module scope, dropped the redundant local one, removedmutfrom two read-only bindings.cargo build --release+cargo testpass.2.
style(rust): cargo fmt all first-party crates(1d743b2)The
rustfmtjob (notallow_failure) runscargo fmt -- --checkper crate; all 8 failed because the code was never fmt-checked while the job was dormant — same story as themix formatsweep in #71, for Rust. Purecargo fmtoutput, no logic changes.3.
fix(gitlab-ci): quarantine the non-building quic_transport NIF(89a4c1b)opsm_ex/native/quic_transportdoes not compile: pinnedh3 0.0.6/h3-quinn 0.0.7predatequinn 0.11's now-privateStreamIdfield, and with no committedCargo.lockthe fresh resolve breaks. It's an optional QUIC/HTTP3 NIF —Opsm.Transport.QuicNifswallows a failed:erlang.load_nifand falls back to HTTP/2 (nif_loaded?is hard-codedfalse), so the Elixir side (807 tests) runs fine without it, and no CI builds it today. Rather than sink a full pre-1.0h3-ecosystem migration into optional aspirational code, I removed it from$RUST_CRATE_DIRSand therules:/artifacts lists, with aQUARANTINEDheader note stating the un-quarantine condition (migrate theh3/h3-quinn/quinntriple to a compatible set + commit a lockfile). Flagged as a follow-up decision for you — see below.Verified (real Rust 1.9x toolchain, this environment)
cargo build --release✓,cargo fmt -- --check✓;checky-monkeytests 4/4, others build clean (0 tests defined).gitlab-ci.ymlparses; only 2quic_transportmentions remain (both the header note)just toolchain-check✓For your call (not done here)
h3crate is pre-1.0 and churns hard (recv_datanow returnsimpl Buf, send-side API changes, etc.) — a real migration, not a version bump. Worth doing only if QUIC/HTTP3 transport is on the near-term roadmap; otherwise the quarantine + HTTP/2 fallback is the honest steady state.cargo-audit/cargo-denyjob bodies still aren't exercised here (installing those tools from crates.io for 8 crates wasn't worth the sandbox time); the build/test/fmt jobs are now genuinely verified.🤖 Generated with Claude Code
https://claude.ai/code/session_01Kq24sZCEohSrNFXSuEuz6C
Generated by Claude Code